<?php

use Phinx\Migration\AbstractMigration;

class AddToolManUserInUserTable extends AbstractMigration
{

    public function up()
    {
        $this->table("user")->insert([
            "name" => "工具小助手",
            "email" => "tool-man@teamones.com",
            "password" => create_pass("default-password"),
            "phone" => "19000000001",
            "status" => 1,
            "sex" => "female",
            "uuid" => create_uuid(),
            "active" => 1,
            "is_system" => "yes",
            "channel" => "",
        ])->saveData();
    }

    public function down()
    {
        $this->execute("delete from user where phone='19000000001' and is_system='yes'");
    }
}
